 <!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$setting.webname}-用户列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="/public/static/admin/layui/css/layui.css" rel="stylesheet">
    <link rel="shortcut icon" href="/public/static/favicon.ico">
    <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/public/static/admin/css/plugins/footable/footable.core.css" rel="stylesheet">
    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
	<style>
	  .tools a i{
	    color:#19a9d5
	  }
	  .tools a i:hover{
	    text-shadow:0px 0px 5px #19a9d5;
	  }
	</style>

</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>用户列表</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="{:url('Admins/admin')}">主页</a>
                </li>
                <li>
                    <strong>用户列表</strong>
                </li>
            </ol>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>用户列表</h5>
                        <div class="ibox-tools tools">
                            <a href="{:url('Admins/addform')}"><i class="glyphicon glyphicon-plus" title="添加管理员"></i></a>
                        </div>
                    </div>
                    <div class="ibox-content">

                        <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="8">
                            <thead>
                            <tr>
                                <th data-toggle="true">用户名</th>
                                <th>编号</th>
                                <th>联系电话</th>
                                <th data-hide="all">联系地址</th>
                                <th data-hide="all">注册时间</th>
                                <th data-hide="all">最后一次登陆IP</th>
                                <th data-hide="all">最后一次登陆时间</th>
                                <th data-hide="all">邮箱</th>
                                <th data-hide="all">拥有栏目</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {foreach $list as $vo}
                            <tr>
                                <td>{$vo.username}</td>
                                <td>{$vo.id}</td>
                                <td>{$vo.phone}</td>
                                <td>{$vo.map}</td>
                                <td><span class="pie">{$vo.create_time}</span></td>
                                <td><span class="pie">{$vo.login_ip}</span></td>
                                <td>{$vo.login_time|date="Y-m-d H:i:s",###}</td>
                                <td>{$vo.email}</td>
                                {if condition="!empty($vo.jurisdiction)"}
                                <td>
                                    {foreach $vo.jurisdiction as $k=>$vs}
                                        {$vs.title}【
                                        {foreach $vo.jurisdictiontow[$k] as $ks=>$vvs}
                                            {$vvs.title},
                                        {/foreach}】;
                                    {/foreach}
                                </td>
                                {else /}
                                    <td>无</td>
                                {/if}
                                <td><a href="{:url('Admins/update')}?id={$vo.id}"><i class="glyphicon glyphicon-pencil"></i></a> {if condition="$vo.username != $user.username"}<a class="del" data-id="{$vo.id}"><i class="glyphicon glyphicon-trash"></i></a>{/if}</td>
                            </tr>
                            {/foreach}
                            </tbody>
                            <tfoot>
                            <tr>
                                <td colspan="5">
                                    <ul class="pagination pull-right"></ul>
                                </td>
                            </tr>
                            </tfoot>
                        </table>

                    </div>
                </div>

        </div>
    </div>
    <!-- 全局js -->
    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="/public/static/admin/js/plugins/footable/footable.all.min.js"></script>

    <!-- 自定义js -->
    <script src="/public/static/admin/js/content.js?v=1.0.0"></script>
    <!-- layui-->
    <script src="/public/static/admin/layui/layui.js"></script>
    <script>
        $(document).ready(function() {

            $('.footable').footable();
            $('.footable2').footable();

        });
        layui.use('layer', function(){ //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer; //独立版的layer无需执行这一句
            //点击提交
            $(".del").click(function(){
                var s = $(this);
                top.layer.msg('你确定要删除？', {
                    time: 20000, //20s后自动关闭
                    shade: 0.8,
                    btn: ['确定', '取消'],
                    btn1:function(){
                        $.post("{:url('Admins/deletes')}",{id:s.attr('data-id')},function(data){
                            top.layer.closeAll();
                            top.layer.msg(data.msg,{time:2000,shade:0.5},function(){
                                if(data.url){
                                    window.location.href = data.url;
                                }
                            });
                        });
                    }
                });

            });
        });
    </script>

    
    

</body>

</html>
